package top.hcode.hoj.pojo.entity.course;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * @author orangej
 * @since 2024/12/17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="课程章节", description="")
public class CourseSection implements Serializable {

    private static final long serialVersionUID = 6922952380138484749L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "课程id")
    private Long courseId;

    @ApiModelProperty(value = "章节名称")
    private String sectionName;

    @ApiModelProperty(value = "章节描述")
    private String description;

    @ApiModelProperty(value = "排序，由小到大")
    private Integer sortOrder;

    @ApiModelProperty(value = "父章节id")
    private Long parentId;

    @ApiModelProperty(value = "用户id")
    private String uid;

    @ApiModelProperty(value = "团队id")
    private Long gid;

    @ApiModelProperty(value = "资料文件类型，StuffType")
    private String fileType;

    @ApiModelProperty(value = "资料文件地址")
    private String fileUrl;

    @ApiModelProperty(value = "资料文件大小")
    private Integer fileSize;

    @ApiModelProperty(value = "是否叶子节点，关联有文件之后就是")
    private Boolean isLeaf;

    @ApiModelProperty(value = "预览状态，pending：处理中，ready：可预览，failed：预览失败")
    private String previewStatus;

    @ApiModelProperty(value = "预览信息")
    private String filePreviewId;

    @ApiModelProperty(value = "是否启用")
    private Boolean enabled = true;

    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;

    @TableField(exist = false)
    private Course course;
}
